<template>
  <el-container>
    <el-header>政治面貌统计</el-header>
    <el-form :model="form" label-width="80px">
      <el-table :data="PolicyList" border stripe>
        <el-table-column label="政治面貌" prop="spo"></el-table-column>
        <el-table-column label="数量" prop="counts"></el-table-column>
      </el-table>
    </el-form>
  </el-container>
</template>

<script>
export default {
  created() {
    this.showArea();
  },
  data() {
    return {
      form: {},
      query: {
        spo: "",
        counts: ""
      },
      PolicyList: [],
      total: 0
    }
  },
  methods: {
    async showArea() {
      this.$axios.post("http://localhost:8081/showPolicy", this.query).then(res => {
        console.log(res.data);
        this.PolicyList = res.data;
      })
    }
  }
};
</script>

<style scoped>
.el-header {
  color: #333;
  line-height: 60px;
  font-size: 40px;
}
</style>